//
//  YKTaskUtil.h
//  YK_BaseTools
//
//  Created by edward on 2020/2/23.

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface YKTaskUtil : NSObject

- (void)addBlock:(void(^)(void))block priority:(NSInteger)priority;

/// 指定执行某个block
/// @param priority 优先级序号
- (void)executeTaskWithPriority:(NSInteger)priority;

- (void)nextTask;

// 索引减少1 执行[nextTask]会再次执行本次操作
- (void)rollbackOneStep;

- (void)executeFirstTask;

- (void)clearTask;

@end

NS_ASSUME_NONNULL_END
